package com.rank.main;

import java.util.Iterator;

import com.rank.test.UserInfo;

public class IsFollowTestMain {
	// 简单测试、没有采用单元测试Junit
	public static void main(String[] args) {
		/*UserInfo user1 = new UserInfoImpl("1");
		UserInfo user2 = new UserInfoImpl("2");
		UserInfo user3 = new UserInfoImpl("3");
		user1.follow("2");
		user2.follow("1");
		user2.follow("3");
		user3.follow("1");
		user3.follow("2");
		boolean isfollowing = user1.isfollowing("2");
		System.out.println("user1 isfollowing user2 result = " + isfollowing); // true
		boolean isfollowed = user1.isfollowedBy("3");
		System.out.println("user1 isfollowed by user3 result = " + isfollowed); // true
		Long followingCount = user1.followingCount();
		System.out.println("user1 followingCount = " + followingCount); //
		Long followedCount = user2.followerCount();
		System.out.println("user2 followedCount = " + followedCount); // 2
		Iterator<String> commonFollowing = user1.commonfollowing("3")
				.iterator();
		System.out.println("user1 and user3 common following = ");
		while (commonFollowing.hasNext()) {
			System.out.println(commonFollowing.next()); // 2
		}
		Iterator<String> commonFans = user3.commonfollowedBy("1").iterator();
		System.out.println("user1 and user3 common fans = ");
		while (commonFans.hasNext()) {
			System.out.println(commonFans.next()); // 2
		}*/
	}
}
